           <#include "../inc.html"/>
 <script type="text/javascript">
<!--
  $(function(){
  	sy.admin.menu${(OP.TMenu.id)!}.save = function(obj) {
  		if($("#menu${(OP.TMenu.id)!}Form").valid()){
  			$.ajax({
				type: "POST", 
				url: "op_save_${(OP.TMenu.id)!}.action",
				data: $('#menu${(OP.TMenu.id)!}Form').serializeArray(),
				dataType: "json",
				success: function(data){
					if(data.success) {
						sy.closeWindow();
						$('#admin_menu${(OP.TMenu.id)!}_datagrid').bootstrapTable('refresh');
					}
					sy.toastrsAlert({
		       		     code: data.success ? 'success' :'error',
		       		     msg: data.success ? '成功' :'失败'
		       		});
				}
			});
  		}
		 
	}
  	
  });

//-->
</script>
       <div class="wrapper wrapper-content gray-bg bgg animated  ${(cfg.animated)!}   "   style="height:100%" >
                <div class="ibox">
                    <div class="ibox-content">
                    <form class="form-horizontal m-t required-validate" id="menu${(OP.TMenu.id)!}Form"  action="op_save_${(OP.TMenu.id)!}.${(cfg.suffix)!'action'}"  method="post">
                    <input type="hidden" name="managerid" value="${(dto.managerid)!}"/>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">菜单：</label>
                                <div class="col-sm-8">
                                       <select class="form-control m-b" name="id.menu">
                                        <option value= "">请选择菜单</option>
                                        <@my.list id="d" sql="select  *  from t_sys_menu a where 1=1 order by a.scort " >
										<option value="${d['id']}" <#if d['id'] == (dto.id.menu)!0> selected</#if>>
											<#list 0..(d['nlevel']!0) as a>－</#list>＋ ${d['name']}
										</option>
										</@my.list>
                                       </select>
                                </div> 
                            </div>
                                <div class="form-group">
                                <label class="col-sm-3 control-label">操作名称：</label>
                                <div class="col-sm-8">
                                    <input  name="name"   value="${(dto.name)!}"  class="form-control" validate="{ required: true,maxlength:20,messages:{required:'请填写操作',maxlength:' '}}"  type="text"   >
                                </div>
                            </div>
                                <div class="form-group">
                                <label class="col-sm-3 control-label">代码：</label>
                                <div class="col-sm-8">
                                    <input  name="id.op"  value="${(dto.id.op)!}"  class="form-control" validate="{ required: true,maxlength:20,messages:{required:'请填写操作代码',maxlength:' '}}"  type="text"   >
                                       <div class="help-block m-b-none"><i class="fa fa-info-circle"></i> 比如list add edit remove save 等</div>  
                                </div>
                            </div>
                                <div class="form-group">
                                <label class="col-sm-3 control-label">图标：</label>
                                <div class="col-sm-8">
                                    <input  name="icon"  value="${(dto.icon)!}"  class="form-control"   type="text"   >
                                </div>
                            </div>
                              <div class="form-group">
                                <label class="col-sm-3 control-label">排序：</label>
                                <div class="col-sm-8">
                                    <input  name="ordno"  value="${(dto.ordno)!}"  class="form-control"   type="text"   >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">备注：</label>
                                <div class="col-sm-8">
                                       <textarea   name="remark" cols="55" rows="3" class="form-control" >${(dto.remark?html)!}</textarea>
                                </div>
                            </div>
                             
                            <div class="form-group">
                                <label class="col-sm-3 control-label">工具栏：</label>
                                <div class="col-sm-8">
                                     <div class="radio i-checks    radio-inline">
                                        <label>
                                            <input type="radio" value="true" <#if ((dto.isshow)!true)==true> checked</#if> name="isshow"> <i></i> 启动</label>
                                    </div>
                                    <div class="radio i-checks    radio-inline">
                                        <label>
                                            <input type="radio"  <#if ((dto.isshow)!true)==false> checked</#if>  value="false" name="isshow"> <i></i>禁用</label>
                                    </div>
                                </div>
                            </div>
                              
                        </form>
                        
                    </div>
                </div>
                </div>
